<%--
  Created by IntelliJ IDEA.
  User: root
  Date: 11/12/24
  Time: 6:46 PM
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<header id="masthead" class="site-header">
    <nav id="top-header">
        <div class="top-nav">
            <div class="user-login">
                <c:choose>
                    <c:when test="${sessionScope.user==null}">
                        <a href="/login">Login</a> | <a href="/register">Register</a>
                    </c:when>
                    <c:otherwise>
                        <a href="/admin">Enter Admin</a>
                    </c:otherwise>
                </c:choose>
                <a href="https://ittony.com/shop.html" target="_blank" style="color: red;">Pay for this</a>
            </div>
            <div class="menu-topmenu-container">
                <ul id="menu-topmenu" class="top-menu">
                    <c:forEach items="${menuList}" var="m">
                        <li class="menu-item">
                            <c:if test="${m.menuLevel==1}">
                                <a href="${m.menuUrl}">
                                    <i class="${m.menuIcon}"></i>
                                    <span class="font-text">${m.menuName}&nbsp;</span>&nbsp;
                                </a>
                            </c:if>
                        </li>
                    </c:forEach>
                </ul>
            </div>
        </div>
    </nav>

    <div id="menu-box">
        <div id="top-menu">
            <span class="nav-search">
                <i class="fa fa-search"></i>
            </span>
            <div class="logo-site"><h1 class="site-title">
                <a href="/" title="${options.optionSiteTitle}">${options.optionSiteTitle}</a>
            </h1>
                <p class="site-description">${options.optionSiteDescription}</p>
            </div>
            <div id="site-nav-wrap">
                <div id="sidr-close">
                    <a href="#sidr-close" class="toggle-sidr-close">x</a>
                </div>
                <nav id="site-nav" class="main-nav">
                    <a href="#sidr-main" id="navigation-toggle" class="bars">
                        <i class="fa fa-bars"></i>
                    </a>
                    <div class="menu-pcmenu-container">
                        <ul id="menu-pcmenu" class="down-menu nav-menu sf-js-enabled sf-arrows">
                            <li>
                               <a href="/">
                                   <i class="fa-home fa"></i>
                                   <span class="font-text">First Page</span>
                               </a>
                            </li>

                            <c:forEach items="${allCategoryList}" var="category">
                                <c:if test="${category.categoryPid==0}">
                                    <li>
                                        <a href="/category/${category.categoryId}">
                                            <i class="${category.categoryIcon}"></i>
                                            <span class="font-text">${category.categoryName}</span>
                                        </a>
                                        <ul class="sub-menu">
                                            <c:forEach items="${allCategoryList}" var="cate">
                                                <c:if test="${cate.categoryPid==category.categoryId}">
                                                    <li>
                                                        <a href="/category/${cate.categoryId}" target="_blank">${cate.categoryName}</a>
                                                    </li>
                                                </c:if>
                                            </c:forEach>
                                        </ul>
                                    </li>
                                </c:if>
                            </c:forEach>
                            <c:forEach items="${menuList}" var="m">
                                <c:if test="${m.menuLevel}==2">
                                    <li>
                                        <a href="${m.menuUrl}">
                                            <i class="${m.menuIcon}"></i>
                                            <span class="font-text">${m.menuName}&nbsp;</span>
                                        </a>
                                    </li>
                                </c:if>
                            </c:forEach>
                        </ul>
                    </div>
                </nav>
            </div>
            <div class="clear"></div>
        </div> <!-- #top-menu -->
    </div> <!--#menu-box -->
</header>

<div id="search-main">
    <div class="searchbar">
        <form method="get" id="searchform" action="/search" accept-charset="UTF-8">
            <span>
                <input type="text" value="" name="keywords" id="s" placeholder="Please input content" required="">
                <button type="submit" id="searchsubmit">Search</button>
            </span>
        </form>
    </div>
    <div class="clear"></div>
</div>

<rapid:block name="breadcrumb"></rapid:block>
<%--<html>
<head>
    <title>Title</title>
</head>
<body>

</body>
</html>--%>
